(() => {
    class Person {
        constructor(name, age, sex) {
            this.name = name;
            this.age = age;
            this.sex = sex;
        }
        sayHi() {
            console.log(`我叫${this.name},我的年龄是${this.age},我的性别是${this.sex}`);
            console.log(this.name);
        }
    }
    class Student extends Person {
        constructor(name, age, sex) {
            super(name, age, sex);
        }
        sayHi() {
            console.log(`我叫${this.name},我的年龄是${this.age},我的性别是${this.sex}`);
            console.log(this.name);
        }
    }
    const person1 = new Person("小明", 18, "男");
    person1.sayHi();
    const person2 = new Student("大明", 89, "女");
    person2.sayHi();
})();
